<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Racc::ParserFileGenerator - racc: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-actions">#actions</a>
    <li ><a href="#method-i-cref_pop">#cref_pop</a>
    <li ><a href="#method-i-cref_push">#cref_push</a>
    <li ><a href="#method-i-detab">#detab</a>
    <li ><a href="#method-i-embed_library">#embed_library</a>
    <li ><a href="#method-i-footer">#footer</a>
    <li ><a href="#method-i-generate_parser">#generate_parser</a>
    <li ><a href="#method-i-generate_parser_file">#generate_parser_file</a>
    <li ><a href="#method-i-header">#header</a>
    <li ><a href="#method-i-i_i_sym_list">#i_i_sym_list</a>
    <li ><a href="#method-i-indent">#indent</a>
    <li ><a href="#method-i-indent_re">#indent_re</a>
    <li ><a href="#method-i-init_line_conversion_system">#init_line_conversion_system</a>
    <li ><a href="#method-i-inner">#inner</a>
    <li ><a href="#method-i-integer_list">#integer_list</a>
    <li ><a href="#method-i-line">#line</a>
    <li ><a href="#method-i-make_delimiter">#make_delimiter</a>
    <li ><a href="#method-i-make_separator">#make_separator</a>
    <li ><a href="#method-i-minimum_indent">#minimum_indent</a>
    <li ><a href="#method-i-n_indent">#n_indent</a>
    <li ><a href="#method-i-notice">#notice</a>
    <li ><a href="#method-i-parser_class">#parser_class</a>
    <li ><a href="#method-i-parser_file">#parser_file</a>
    <li ><a href="#method-i-put">#put</a>
    <li ><a href="#method-i-put_state_transition_table">#put_state_transition_table</a>
    <li ><a href="#method-i-remove_blank_lines">#remove_blank_lines</a>
    <li ><a href="#method-i-replace_location">#replace_location</a>
    <li ><a href="#method-i-require">#require</a>
    <li ><a href="#method-i-runtime_source">#runtime_source</a>
    <li ><a href="#method-i-shebang">#shebang</a>
    <li ><a href="#method-i-state_transition_table">#state_transition_table</a>
    <li ><a href="#method-i-string_list">#string_list</a>
    <li ><a href="#method-i-sym_int_hash">#sym_int_hash</a>
    <li ><a href="#method-i-toplevel-3F">#toplevel?</a>
    <li ><a href="#method-i-unindent_auto">#unindent_auto</a>
    <li ><a href="#method-i-unique_separator">#unique_separator</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Racc::ParserFileGenerator">
    <h1 id="class-Racc::ParserFileGenerator" class="class">
      class Racc::ParserFileGenerator
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">


      <section class="constants-list">
      <header>
      <h3>Constants</h3>
      </header>
      <dl>
          <dt id="RE_CACHE">RE_CACHE
          <dd>
          <dt id="RUBY_PATH">RUBY_PATH
          <dd>
        </dl>
        </section>



                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(states, params)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 72</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">states</span>, <span class="ruby-identifier">params</span>)
  <span class="ruby-ivar">@states</span> = <span class="ruby-identifier">states</span>
  <span class="ruby-ivar">@grammar</span> = <span class="ruby-identifier">states</span>.<span class="ruby-identifier">grammar</span>
  <span class="ruby-ivar">@params</span> = <span class="ruby-identifier">params</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-generate_parser" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">generate_parser</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="generate_parser-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 78</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">generate_parser</span>
  <span class="ruby-identifier">string_io</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>

  <span class="ruby-identifier">init_line_conversion_system</span>
  <span class="ruby-ivar">@f</span> = <span class="ruby-identifier">string_io</span>
  <span class="ruby-identifier">parser_file</span>

  <span class="ruby-identifier">string_io</span>.<span class="ruby-identifier">rewind</span>
  <span class="ruby-identifier">string_io</span>.<span class="ruby-identifier">read</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-generate_parser_file" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">generate_parser_file</span><span
                                class="method-args">(destpath)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="generate_parser_file-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 89</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">generate_parser_file</span>(<span class="ruby-identifier">destpath</span>)
  <span class="ruby-identifier">init_line_conversion_system</span>
  <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">destpath</span>, <span class="ruby-string">&#39;w&#39;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@f</span> = <span class="ruby-identifier">f</span>
    <span class="ruby-identifier">parser_file</span>
  }
  <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-value">0755</span>, <span class="ruby-identifier">destpath</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">make_executable?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-put_state_transition_table" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">put_state_transition_table</span><span
                                class="method-args">(f)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p><a href="State.html"><code>State</code></a> Transition Table Serialization</p>

                              <div class="method-source-code" id="put_state_transition_table-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 254</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">put_state_transition_table</span>(<span class="ruby-identifier">f</span>)
  <span class="ruby-ivar">@f</span> = <span class="ruby-identifier">f</span>
  <span class="ruby-identifier">state_transition_table</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-actions" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">actions</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="actions-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 364</span>
    <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">actions</span>
      <span class="ruby-ivar">@grammar</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">rule</span><span class="ruby-operator">|</span>
        <span class="ruby-keyword">unless</span> <span class="ruby-identifier">rule</span>.<span class="ruby-identifier">action</span>.<span class="ruby-identifier">source?</span>
          <span class="ruby-identifier">raise</span> <span class="ruby-string">&quot;racc: fatal: cannot generate parser file when any action is a Proc&quot;</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>

      <span class="ruby-keyword">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">result_var?</span>
        <span class="ruby-identifier">decl</span> = <span class="ruby-string">&#39;, result&#39;</span>
        <span class="ruby-identifier">retval</span> = <span class="ruby-string">&quot;\n    result&quot;</span>
        <span class="ruby-identifier">default_body</span> = <span class="ruby-string">&#39;&#39;</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">decl</span> = <span class="ruby-string">&#39;&#39;</span>
        <span class="ruby-identifier">retval</span> = <span class="ruby-string">&#39;&#39;</span>
        <span class="ruby-identifier">default_body</span> = <span class="ruby-string">&#39;val[0]&#39;</span>
      <span class="ruby-keyword">end</span>
      <span class="ruby-ivar">@grammar</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">rule</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">line</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">rule</span>.<span class="ruby-identifier">action</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">omit_action_call?</span>
          <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;# reduce #{rule.ident} omitted&quot;</span>
        <span class="ruby-keyword">else</span>
          <span class="ruby-identifier">src0</span> = <span class="ruby-identifier">rule</span>.<span class="ruby-identifier">action</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">||</span> <span class="ruby-constant">SourceText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">default_body</span>, <span class="ruby-keyword">__FILE__</span>, <span class="ruby-value">0</span>)
          <span class="ruby-keyword">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">convert_line?</span>
            <span class="ruby-identifier">src</span> = <span class="ruby-identifier">remove_blank_lines</span>(<span class="ruby-identifier">src0</span>)
            <span class="ruby-identifier">delim</span> = <span class="ruby-identifier">make_delimiter</span>(<span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>)
            <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">printf</span> <span class="ruby-identifier">unindent_auto</span>(<span class="ruby-identifier">&lt;&lt;-End</span>),
<span class="ruby-value">              module_eval(&lt;&lt;&#39;%s&#39;, &#39;%s&#39;, %d)
                def _reduce_%d(val, _values%s)
                  %s%s
                end
              %s
</span><span class="ruby-identifier">            End</span>
                      <span class="ruby-identifier">delim</span>, <span class="ruby-identifier">src</span>.<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">src</span>.<span class="ruby-identifier">lineno</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
                        <span class="ruby-identifier">rule</span>.<span class="ruby-identifier">ident</span>, <span class="ruby-identifier">decl</span>,
                        <span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>, <span class="ruby-identifier">retval</span>,
                      <span class="ruby-identifier">delim</span>
          <span class="ruby-keyword">else</span>
            <span class="ruby-identifier">src</span> = <span class="ruby-identifier">remove_blank_lines</span>(<span class="ruby-identifier">src0</span>)
            <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">printf</span> <span class="ruby-identifier">unindent_auto</span>(<span class="ruby-identifier">&lt;&lt;-End</span>),
<span class="ruby-value">              def _reduce_%d(val, _values%s)
              %s%s
              end
</span><span class="ruby-identifier">            End</span>
                      <span class="ruby-identifier">rule</span>.<span class="ruby-identifier">ident</span>, <span class="ruby-identifier">decl</span>,
                      <span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>, <span class="ruby-identifier">retval</span>
          <span class="ruby-keyword">end</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">printf</span> <span class="ruby-identifier">unindent_auto</span>(<span class="ruby-identifier">&lt;&lt;-&#39;End&#39;</span>), <span class="ruby-identifier">decl</span>
<span class="ruby-value">        def _reduce_none(val, _values%s)
          val[0]
        end
</span><span class="ruby-identifier">      End</span>
      <span class="ruby-identifier">line</span>
    <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cref_pop" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cref_pop</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cref_pop-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 213</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cref_pop</span>
  <span class="ruby-ivar">@cref</span>.<span class="ruby-identifier">pop</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cref_push" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cref_push</span><span
                                class="method-args">(name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cref_push-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 209</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cref_push</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-ivar">@cref</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-detab" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">detab</span><span
                                class="method-args">(str, ts = 8)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="detab-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 458</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">detab</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">ts</span> = <span class="ruby-value">8</span>)
  <span class="ruby-identifier">add</span> = <span class="ruby-value">0</span>
  <span class="ruby-identifier">len</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/\t/</span>) {
    <span class="ruby-identifier">len</span> = <span class="ruby-identifier">ts</span> <span class="ruby-operator">-</span> (<span class="ruby-node">$`</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">add</span>) <span class="ruby-operator">%</span> <span class="ruby-identifier">ts</span>
    <span class="ruby-identifier">add</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">len</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
    <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">len</span>
  }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-embed_library" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">embed_library</span><span
                                class="method-args">(src)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="embed_library-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 136</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">embed_library</span>(<span class="ruby-identifier">src</span>)
  <span class="ruby-identifier">line</span> <span class="ruby-node">%[###### #{src.filename} begin]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">%[unless $&quot;.find {|p| p.end_with?(&#39;/#{src.filename}&#39;)}]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">%[$&quot;.push &quot;\#{__dir__}/#{src.filename}&quot;]</span>
  <span class="ruby-identifier">put</span> <span class="ruby-identifier">src</span>, <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">convert_line?</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">%[end]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">%[###### #{src.filename} end]</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-footer" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">footer</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="footer-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 181</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">footer</span>
  <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">footer</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">src</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">line</span>
    <span class="ruby-identifier">put</span> <span class="ruby-identifier">src</span>, <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">convert_line_all?</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-header" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">header</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="header-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 167</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">header</span>
  <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">src</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">line</span>
    <span class="ruby-identifier">put</span> <span class="ruby-identifier">src</span>, <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">convert_line_all?</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-i_i_sym_list" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">i_i_sym_list</span><span
                                class="method-args">(name, table)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="i_i_sym_list-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 334</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">i_i_sym_list</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">table</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-string">&#39;&#39;</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;#{name} = [&quot;</span>
  <span class="ruby-identifier">table</span>.<span class="ruby-identifier">each_slice</span>(<span class="ruby-value">3</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">len</span>, <span class="ruby-identifier">target</span>, <span class="ruby-identifier">mid</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">sep</span>; <span class="ruby-identifier">sep</span> = <span class="ruby-string">&quot;,\n&quot;</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">printf</span> <span class="ruby-string">&#39;  %d, %d, %s&#39;</span>, <span class="ruby-identifier">len</span>, <span class="ruby-identifier">target</span>, <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">inspect</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">&quot; ]&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-indent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">indent</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="indent-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 217</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">indent</span>
  <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">&#39;  &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@cref</span>.<span class="ruby-identifier">size</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-indent_re" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">indent_re</span><span
                                class="method-args">(n)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="indent_re-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 454</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">indent_re</span>(<span class="ruby-identifier">n</span>)
  <span class="ruby-constant">RE_CACHE</span>[<span class="ruby-identifier">n</span>] <span class="ruby-operator">||=</span> <span class="ruby-regexp">/\A {#{n}}/</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-init_line_conversion_system" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">init_line_conversion_system</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="init_line_conversion_system-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 204</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">init_line_conversion_system</span>
  <span class="ruby-ivar">@cref</span> = []
  <span class="ruby-ivar">@used_separator</span> = {}
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-inner" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">inner</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="inner-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 174</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inner</span>
  <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">inner</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">src</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">line</span>
    <span class="ruby-identifier">put</span> <span class="ruby-identifier">src</span>, <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">convert_line?</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-integer_list" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">integer_list</span><span
                                class="method-args">(name, table)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="integer_list-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 324</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">integer_list</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">table</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-string">&#39;&#39;</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;#{name} = [&quot;</span>
  <span class="ruby-identifier">table</span>.<span class="ruby-identifier">each_slice</span>(<span class="ruby-value">10</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ns</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">sep</span>; <span class="ruby-identifier">sep</span> = <span class="ruby-string">&quot;,\n&quot;</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-string">&#39;%6s&#39;</span>, <span class="ruby-identifier">n</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-string">&#39;nil&#39;</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;,&#39;</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">&#39; ]&#39;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-line" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">line</span><span
                                class="method-args">(str = &#39;&#39;)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="line-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 200</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">line</span>(<span class="ruby-identifier">str</span> = <span class="ruby-string">&#39;&#39;</span>)
  <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">str</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-make_delimiter" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">make_delimiter</span><span
                                class="method-args">(body)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="make_delimiter-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 430</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">make_delimiter</span>(<span class="ruby-identifier">body</span>)
  <span class="ruby-identifier">delim</span> = <span class="ruby-string">&#39;.,.,&#39;</span>
  <span class="ruby-keyword">while</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">delim</span>)
    <span class="ruby-identifier">delim</span> <span class="ruby-operator">*=</span> <span class="ruby-value">2</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">delim</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-make_separator" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">make_separator</span><span
                                class="method-args">(src)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="make_separator-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 233</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">make_separator</span>(<span class="ruby-identifier">src</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-identifier">unique_separator</span>(<span class="ruby-identifier">src</span>.<span class="ruby-identifier">filename</span>)
  <span class="ruby-identifier">sep</span> <span class="ruby-operator">*=</span> <span class="ruby-value">2</span> <span class="ruby-keyword">while</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">sep</span>)
  <span class="ruby-identifier">sep</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-minimum_indent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">minimum_indent</span><span
                                class="method-args">(lines)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="minimum_indent-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 444</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">minimum_indent</span>(<span class="ruby-identifier">lines</span>)
  <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">n_indent</span>(<span class="ruby-identifier">line</span>) }.<span class="ruby-identifier">min</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-n_indent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">n_indent</span><span
                                class="method-args">(line)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="n_indent-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 448</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">n_indent</span>(<span class="ruby-identifier">line</span>)
  <span class="ruby-identifier">line</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-regexp">/\A\s+/</span>).<span class="ruby-identifier">size</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-notice" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">notice</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="notice-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 124</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">notice</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">%q[#]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">%q[# DO NOT MODIFY!!!!]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">%Q[# This file is automatically generated by Racc #{Racc::Version}]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">%Q[# from Racc grammar file &quot;#{@params.filename}&quot;.]</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">%q[#]</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parser_class" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parser_class</span><span
                                class="method-args">(classname, superclass) { || ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parser_class-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 149</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parser_class</span>(<span class="ruby-identifier">classname</span>, <span class="ruby-identifier">superclass</span>)
  <span class="ruby-identifier">mods</span> = <span class="ruby-identifier">classname</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;::&#39;</span>)
  <span class="ruby-identifier">classid</span> = <span class="ruby-identifier">mods</span>.<span class="ruby-identifier">pop</span>
  <span class="ruby-identifier">mods</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">indent</span>; <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;module #{mod}&quot;</span>
    <span class="ruby-identifier">cref_push</span> <span class="ruby-identifier">mod</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">indent</span>; <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;class #{classid} &lt; #{superclass}&quot;</span>
  <span class="ruby-identifier">cref_push</span> <span class="ruby-identifier">classid</span>
  <span class="ruby-keyword">yield</span>
  <span class="ruby-identifier">cref_pop</span>
  <span class="ruby-identifier">indent</span>; <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;end   \# class #{classid}&quot;</span>
  <span class="ruby-identifier">mods</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">cref_pop</span>
    <span class="ruby-identifier">indent</span>; <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;end   \# module #{mod}&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parser_file" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parser_file</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parser_file-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 100</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parser_file</span>
  <span class="ruby-identifier">shebang</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">interpreter</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">make_executable?</span>
  <span class="ruby-identifier">notice</span>
  <span class="ruby-identifier">line</span>
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">embed_runtime?</span>
    <span class="ruby-identifier">embed_library</span> <span class="ruby-identifier">runtime_source</span>()
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;racc/parser.rb&#39;</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">header</span>
  <span class="ruby-identifier">parser_class</span>(<span class="ruby-ivar">@params</span>.<span class="ruby-identifier">classname</span>, <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">superclass</span>) {
    <span class="ruby-identifier">inner</span>
    <span class="ruby-identifier">state_transition_table</span>
  }
  <span class="ruby-identifier">footer</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-put" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">put</span><span
                                class="method-args">(src, convert_line = false)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Low Level Routines</p>

                              <div class="method-source-code" id="put-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 190</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">put</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">convert_line</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">convert_line</span>
    <span class="ruby-identifier">replace_location</span>(<span class="ruby-identifier">src</span>) {
      <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>
    }
  <span class="ruby-keyword">else</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remove_blank_lines" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remove_blank_lines</span><span
                                class="method-args">(src)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remove_blank_lines-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 421</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remove_blank_lines</span>(<span class="ruby-identifier">src</span>)
  <span class="ruby-identifier">body</span> = <span class="ruby-identifier">src</span>.<span class="ruby-identifier">text</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">line</span> = <span class="ruby-identifier">src</span>.<span class="ruby-identifier">lineno</span>
  <span class="ruby-keyword">while</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-regexp">/\A[ \t\f]*(?:\n|\r\n|\r)/</span>)
    <span class="ruby-identifier">line</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-constant">SourceText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">body</span>, <span class="ruby-identifier">src</span>.<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">line</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-replace_location" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">replace_location</span><span
                                class="method-args">(src) { || ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="replace_location-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 225</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">replace_location</span>(<span class="ruby-identifier">src</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-identifier">make_separator</span>(<span class="ruby-identifier">src</span>)
  <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">&#39;self.class.&#39;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">toplevel?</span>
  <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;module_eval(&lt;&lt;&#39;#{sep}&#39;, &#39;#{src.filename}&#39;, #{src.lineno})&quot;</span>
  <span class="ruby-keyword">yield</span>
  <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">sep</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-require" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">require</span><span
                                class="method-args">(feature)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="require-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 145</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">require</span>(<span class="ruby-identifier">feature</span>)
  <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;require &#39;#{feature}&#39;&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-runtime_source" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">runtime_source</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="runtime_source-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 132</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">runtime_source</span>
  <span class="ruby-constant">SourceText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Racc</span><span class="ruby-operator">::</span><span class="ruby-constant">PARSER_TEXT</span>, <span class="ruby-string">&#39;racc/parser.rb&#39;</span>, <span class="ruby-value">1</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-shebang" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">shebang</span><span
                                class="method-args">(path)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="shebang-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 120</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">shebang</span>(<span class="ruby-identifier">path</span>)
  <span class="ruby-identifier">line</span> <span class="ruby-string">&#39;#!&#39;</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">path</span> <span class="ruby-operator">==</span> <span class="ruby-string">&#39;ruby&#39;</span> <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_PATH</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">path</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-state_transition_table" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">state_transition_table</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="state_transition_table-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 261</span>
    <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">state_transition_table</span>
      <span class="ruby-identifier">table</span> = <span class="ruby-ivar">@states</span>.<span class="ruby-identifier">state_transition_table</span>
      <span class="ruby-identifier">table</span>.<span class="ruby-identifier">use_result_var</span> = <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">result_var?</span>
      <span class="ruby-identifier">table</span>.<span class="ruby-identifier">debug_parser</span> = <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">debug_parser?</span>

      <span class="ruby-identifier">line</span> <span class="ruby-string">&quot;##### State transition tables begin ###&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_action_table&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">action_table</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_action_check&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">action_check</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_action_pointer&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">action_pointer</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_action_default&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">action_default</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_goto_table&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">goto_table</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_goto_check&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">goto_check</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_goto_pointer&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">goto_pointer</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">integer_list</span> <span class="ruby-string">&#39;racc_goto_default&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">goto_default</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">i_i_sym_list</span> <span class="ruby-string">&#39;racc_reduce_table&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">reduce_table</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;racc_reduce_n = #{table.reduce_n}&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;racc_shift_n = #{table.shift_n}&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">sym_int_hash</span> <span class="ruby-string">&#39;racc_token_table&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">token_table</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;racc_nt_base = #{table.nt_base}&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;racc_use_result_var = #{table.use_result_var}&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">unindent_auto</span>(<span class="ruby-identifier">&lt;&lt;-End</span>))
<span class="ruby-value">        Racc_arg = [
          racc_action_table,
          racc_action_check,
          racc_action_default,
          racc_action_pointer,
          racc_goto_table,
          racc_goto_check,
          racc_goto_default,
          racc_goto_pointer,
          racc_nt_base,
          racc_reduce_table,
          racc_token_table,
          racc_shift_n,
          racc_reduce_n,
          racc_use_result_var ]
</span><span class="ruby-identifier">      End</span>
      <span class="ruby-identifier">line</span> <span class="ruby-string">&quot;Ractor.make_shareable(Racc_arg) if defined?(Ractor)&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">string_list</span> <span class="ruby-string">&#39;Racc_token_to_s_table&#39;</span>, <span class="ruby-identifier">table</span>.<span class="ruby-identifier">token_to_s_table</span>
      <span class="ruby-identifier">line</span> <span class="ruby-string">&quot;Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;Racc_debug_parser = #{table.debug_parser}&quot;</span>
      <span class="ruby-identifier">line</span>
      <span class="ruby-identifier">line</span> <span class="ruby-string">&#39;##### State transition tables end #####&#39;</span>
      <span class="ruby-identifier">actions</span>
    <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-string_list" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">string_list</span><span
                                class="method-args">(name, list)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="string_list-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 354</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">string_list</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">list</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-string">&quot;  &quot;</span>
  <span class="ruby-identifier">line</span> <span class="ruby-node">&quot;#{name} = [&quot;</span>
  <span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">sep</span>; <span class="ruby-identifier">sep</span> = <span class="ruby-string">&quot;,\n  &quot;</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">dump</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">&#39; ]&#39;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-sym_int_hash" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">sym_int_hash</span><span
                                class="method-args">(name, h)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="sym_int_hash-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 344</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sym_int_hash</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">h</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-string">&quot;\n&quot;</span>
  <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-node">&quot;#{name} = {&quot;</span>
  <span class="ruby-identifier">h</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">sym</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> }.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sym</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">sep</span>; <span class="ruby-identifier">sep</span> = <span class="ruby-string">&quot;,\n&quot;</span>
    <span class="ruby-ivar">@f</span>.<span class="ruby-identifier">printf</span> <span class="ruby-string">&quot;  %s =&gt; %d&quot;</span>, <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">serialize</span>, <span class="ruby-identifier">i</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">line</span> <span class="ruby-string">&quot; }&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-toplevel-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">toplevel?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="toplevel-3F-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 221</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">toplevel?</span>
  <span class="ruby-ivar">@cref</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-unindent_auto" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">unindent_auto</span><span
                                class="method-args">(str)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="unindent_auto-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 438</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">unindent_auto</span>(<span class="ruby-identifier">str</span>)
  <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">lines</span>.<span class="ruby-identifier">to_a</span>
  <span class="ruby-identifier">n</span> = <span class="ruby-identifier">minimum_indent</span>(<span class="ruby-identifier">lines</span>)
  <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">detab</span>(<span class="ruby-identifier">line</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-identifier">indent_re</span>(<span class="ruby-identifier">n</span>), <span class="ruby-string">&#39;&#39;</span>).<span class="ruby-identifier">rstrip</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;\n&quot;</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;&#39;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-unique_separator" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">unique_separator</span><span
                                class="method-args">(id)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="unique_separator-source">
            <pre><span class="ruby-comment"># File racc-1.7.1/lib/racc/parserfilegenerator.rb, line 239</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">unique_separator</span>(<span class="ruby-identifier">id</span>)
  <span class="ruby-identifier">sep</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span> <span class="ruby-node">&quot;...end #{id}/module_eval...&quot;</span>
  <span class="ruby-keyword">while</span> <span class="ruby-ivar">@used_separator</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">sep</span>)
    <span class="ruby-identifier">sep</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-string">&#39;%02x&#39;</span>, <span class="ruby-identifier">rand</span>(<span class="ruby-value">255</span>))
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@used_separator</span>[<span class="ruby-identifier">sep</span>] = <span class="ruby-keyword">true</span>
  <span class="ruby-identifier">sep</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

